function norm_3 = Norm_3(u, sigma)
% norm_3 = Norm_3(u, sigma)
% 
% Norm_3 computes the Euclidean norm of a [N M K] matrix in the third 
% component. If sigma is specified the "sigma norm is computed instead,
% i.e. norm_sigma(x) = sqrt(norm(x)^2 + sigma^2)
%
% See also: Inner_prod_3
%
% 2013-07-25 --------------------------------------------------------------
% 
% Matthias J. Ehrhardt
% CMIC, University College London, UK
% 
% matthias.ehrhardt.11@ucl.ac.uk
% 
% -------------------------------------------------------------------------

    if nargin < 2; sigma = 0; end;
    norm_3 = sqrt(sum(u.^2, 3) + sigma^2);
    
end